package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 窄化请求
 * @author stone
 * @date 2022/07/11 16:01
 */
@Controller
@RequestMapping("user")
public class UserController {

    //@RequestMapping("user/login")
    //@RequestMapping("/login")
    @RequestMapping("login")
    @ResponseBody
    public BaseRespVo login() {
        BaseRespVo baseRespVo = new BaseRespVo();
        baseRespVo.setData("LOGIN");
        return baseRespVo;
    }
    //@RequestMapping("user/register")
    @RequestMapping("/register")
    @ResponseBody
    public BaseRespVo register() {
        BaseRespVo baseRespVo = new BaseRespVo();
        baseRespVo.setData("REGISTER");
        return baseRespVo;
    }
}
